package com.whw.fy.utils;

import com.kmood.datahandle.DocumentProducer;

import java.util.HashMap;

public class WordUtil {


    public static String getWordUrl(HashMap<String,Object> map,String fileName,String template,String hostUrl,String FilePath) throws Exception {
        String xmlPath = Thread.currentThread().getContextClassLoader().getResource("").getPath()+"model";
        String ExportFilePath = FilePath+fileName;
        DocumentProducer dp = new DocumentProducer();
        dp.Complie(xmlPath,template,true);
        dp.produce(map, ExportFilePath);
        String returnUrl = hostUrl + "resource/" + fileName;
        return returnUrl;
    }


}
